<template>
  <div>
     <!-- 三级联动全局组件已经注册为全局组件，因此不需要引入 -->
    <typeNav />
    <ListContainer />
    <!-- <Recommend /> -->
    <!-- <Rank />-->
    <Like /> 
    <!-- Floor这个组件：自己在组件内部是没有发请求的，数据是父组件给的 -->
    <!-- <Floor v-for="(floor) in floorList" :key="floor.id" :list="floor"/> -->
    <Floor  v-for="item in floors" :key="item.id" :list='item'/>
    <Brand />
  </div>
</template>

<script>
//非路由组件在使用的时候分为三大步：定义、注册、使用
import ListContainer from './listContainer/index'
// import Recommend from './Recommend/index'
import Rank from './Rank/index'
import Like from './Like/index'
import Floor from './Floor/index'
import Brand from './Brand/index'
import Charge from './Charge/index'
import { throttle } from 'lodash'
import {mapState } from 'vuex'
export default {
    components:{
      ListContainer,
      // Recommend,
      Rank,
      Like,
      Floor,
      Brand,
      Charge
    },
    data() {
      return {
      }
    },
    mounted(){
      this.$store.dispatch('getFloors')
      this.$store.dispatch('getUserInfo');
      
    },
    computed:{
      ...mapState({
        floors:(state)=>state.home.floors
      })
    },
    methods: {
      
    }
  }
</script>
<style scoped>

</style>